/*
 * @Author: deng da chao
 * @Date: 2022-07-14 15:58:56
 * @LastEditTime: 2023-03-15 18:06:45
 * @Description: 集市接口
 */
import http from '../../utils/http'

// nft集市列表
const getNftMarketPage = (data) => {
  return http.get('/nft/manGuMarketPage', data)
}

// 选择材料列表
const getNftRobotMarketPage = (data) => {
  return http.get('/nft/getRobotMarketPage', data)
}


// nft商品专区列表
const getNftNftTheme = (data) => {
  return http.get('/nft/nftTheme', data)
}

// 发布转卖
const postSysMemberNftPublishSell = (data) => {
  return http.post('/member/sysMemberNft/publishSell', data)
}

// 发布批量转卖
const postBatchPublishSellBatchPublishSell = (data) => {
  return http.post('/member/sysMemberNft/batchPublishSell', data)
}

// 获取可以批量转卖列表
const getBatchPublishSellBefore = (data) => {
  return http.get('/member/sysMemberNft/batchPublishSellBefore', data)
}

// 取消转卖
const putSysMemberNftCancelSell = (data) => {
  return http.put(`/member/sysMemberNft/cancelSell/${data.memberNftId}`, data)
}

// 全部取消转卖
const getSysMemberNftCancelSellBatch = (data) => {
  return http.get(`/member/sysMemberNft/cancelSellBatch`, data)
}

// 取消转卖白名单
const postSysMemberNftCheckFunctionMember = (data) => {
  return http.post(`/member/sysMemberNft/checkFunctionMember`, data)
}

// NFT转卖列表页
const getSysMemberNftSellList = (data) => {
  return http.get('/member/sysMemberNft/sellList', data)
}

// nft转卖商品详情
const getNftSell = (data) => {
  return http.get(`/nft/sell/${data.id}`, data)
}


// nft平台-转卖下单前置接口
const postOrderNftResellCreateBefore = (data) => {
  return http.post(`/order/orderMain/nftResellCreateBefore`, data)
}

// nft平台-转卖下单
const postOrderNftResellCreate = (data) => {
  return http.post(`/order/orderMain/nftResellCreate`, data)
}

//材料集市、积分集市列表页
const getSysMemberEggList = (data) => {
  return http.get(`/dragon/sysMemberEgg/eggList`, data)
  //  return http.get(`/dragon/sysMemberEggNew/eggCollectList`, data)
}

// 材料购买下单
const postEggPublishBuy = (data) => {
  return http.post(`/dragon/sysMemberEgg/eggPublishBuy`, data)
  // return http.post(`/dragon/sysMemberEggNew/eggPublishBuyNew`, data)
}

// 材料下单前置接口
const postEggPublishBuyBefore = (data) => {
  return http.post(`/dragon/sysMemberEgg/eggPublishBuyBefore`, data)
}
// 详情前置
const getDetailBefore = (data) => {
  return http.get(`/nft/getDetailBefore/${data.sysMemberNftId}`)
}

// 动态获取筛选内容
const getLevelAndCategory = (data) => {
  return http.get(`/nft/getLevelAndCategory`, data)
}

// 价格趋势
const getPriceTendency = (data) => {
  return http.get(`/order/orderMain/getPriceTendency`, data)
}
// 交易动态
const getDealDynamic = (data) => {
  return http.get(`/order/orderMain/getDealDynamic`, data)
}

//新版集市头部分类统计
const getManGuMarketStatistics = (data) => {
  return http.get(`/nft/manGuMarketStatistics`, data)
}

//新版集市顶部系列列表
const getManGuMarketSeriesList = (data) => {
  return http.get(`/nft/manGuMarketSeriesList`, data)
}

// 顶部一级分类列表
const getManGuMarketSeriesGroup = (data) => {
  return http.get(`/nft/manGuMarketSeriesGroup`, data)
}

//推荐合集列表
const getFirstHotAndRecommend = (data) => {
  return http.get(`/nft/firstHotAndRecommend`, data)
}
//热门合集列表
const getHotCompilationsList = (data) => {
  return http.get(`/nft/hotCompilationsList`, data)
}

//系列价格趋势
const getCategoryTendency = (data) => {
  return http.get(`/order/orderMain/getCategoryTendency`, data)
}

//系列交易动态
const getCategoryDealDynamic = (data) => {
  return http.get(`/order/orderMain/getCategoryDealDynamic`, data)
}




export default {
  getNftMarketPage,
  getNftRobotMarketPage,
  getNftNftTheme,
  postSysMemberNftPublishSell,
  postBatchPublishSellBatchPublishSell,
  postSysMemberNftCheckFunctionMember,
  getBatchPublishSellBefore,
  getSysMemberNftSellList,
  getNftSell,
  postOrderNftResellCreateBefore,
  postOrderNftResellCreate,
  putSysMemberNftCancelSell,
  getSysMemberNftCancelSellBatch,
  getSysMemberEggList,
  postEggPublishBuy,
  postEggPublishBuyBefore,
  getDetailBefore,
  getLevelAndCategory,
  getPriceTendency,
  getDealDynamic,
  getManGuMarketStatistics,
  getManGuMarketSeriesList,
  getManGuMarketSeriesGroup,
  getHotCompilationsList,
  getFirstHotAndRecommend,
  getCategoryTendency,
  getCategoryDealDynamic
}
